package com.ty.common.core.common.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户权限变更消息传递的实体类
 * @Author: TangYuan
 * @Date: 2025/8/19 14:35
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserPermissionChangeMessage {

    @Schema(description = "用户id")
    private Long userId;


    @Schema(description = "用户名")
    private String username;

    /**
     * 是否是对所有用户进行permission更新
     */
    private boolean toChangeAll;

    public UserPermissionChangeMessage(String username, boolean toChangeAll) {
        this.username = username;
        this.toChangeAll = toChangeAll;
    }

}
